package cn.edu.pku.ss.music.activities;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewStub;
import android.widget.Button;
import android.widget.TextView;
import cn.edu.pku.ss.music.R;

public class MessageActivity extends Activity {

	private TextView title_textview;
	private Button pull_info_button;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		LayoutInflater inflater = getLayoutInflater();
		View root = inflater.inflate(R.layout.message_layout, null);
		setContentView(root);
		
		final View first_use_panel = findViewById(R.id.first_use_panel);
		pull_info_button = (Button) findViewById(R.id.message_update_btn);
		
		View header = findViewById(R.id.message_header);
		title_textview = (TextView) header.findViewById(R.id.header_title);
		title_textview.setText(R.string.message_title);
		
		pull_info_button.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View arg0) {
				first_use_panel.setVisibility(View.GONE);
				ViewStub message_list_area = (ViewStub) findViewById(R.id.message_list_area);
				message_list_area.inflate();
			}
		});
	}
	
	
	
}
